package binaryTree;

public class countNode {
    private int count = 0;

    public int countNodeTest(TreeNode root) {
        if (root != null) {
            count = countNodeTest(root.left) + countNodeTest(root.right) + 1;
        }
        return count;
    }
}
